package com.lucas;

import com.lucas.Handler.UserServerHandler;
import com.lucas.Service.UserServiceImpl;
import com.lucas.service.UserService;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;


@SpringBootApplication
public class bootStrap {
    public static void main(String[] args) throws InterruptedException {
        //服务器启动
        final ConfigurableApplicationContext run = SpringApplication.run(bootStrap.class, args);
        final UserServerHandler handler = run.getBean(UserServerHandler.class);
        new UserServiceImpl().startServer(handler);
        System.out.println("服务器启动了");
    }
}
